package com.fs.sys.entityservice.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fs.sys.bean.dto.DeptAppDTO;
import com.fs.sys.bean.query.DeptAppQuery;
import com.fs.sys.domain.entity.DeptAppEntity;
import com.fs.sys.domain.mapper.DeptAppMapper;
import com.fs.sys.entityservice.DeptAppEntityService;
import com.fs.common.base.service.AbstractSimpleEntityService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

/**
 * 组织应用关系服务实现 
 * @author Coder Generator 2025-06-06 11:03:10 
 **/
@Service
public class DeptAppEntityServiceImpl extends AbstractSimpleEntityService<DeptAppEntity, DeptAppDTO, DeptAppMapper, DeptAppQuery> implements DeptAppEntityService {
    @Override
    protected QueryWrapper<DeptAppEntity> queryToWrapper(DeptAppQuery query) {
        return this.createQueryWrapper()
                .eq(StringUtils.isNotBlank(query.getId()), "id", query.getId())
                .eq(StringUtils.isNotBlank(query.getAppId()), "app_id", query.getAppId())
                .in(null != query.getIds(), "id", query.getIds());
    }
}